<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>Document</title>
	</head>
	<body>
		<script type="text/javascript">
			function Animal(name, leg){
				this.id = leg;
				this.name = name;
			}
			var a = new Animal("liu", "0");
			
			function Person(name, age){
				this.name = name;
				this.age = age;
			}
			var p = new Person("lei", 1);
			
			function Student(grade){
				this.grade = grade;
			}
			var s = new Student();
			
			Student.prototype = p;
			Person.prototype = a;
		</script>
	</body>
</html>
